package com.atguigu.jxc.controller;

import com.atguigu.jxc.service.GoodsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;


@RestController
@RequestMapping("/goods")
public class GoodController {
    @Autowired
    private GoodsService goodsService;

    @PostMapping("listInventory")
    public Map<String,Object> listInventory(Integer page, Integer rows, String codeOrName, Integer goodsTypeId){
        Map<String, Object> stringObjectMap = goodsService.listInventory(page, rows, codeOrName, goodsTypeId);
        return stringObjectMap;
    }
}